package TOYS.WIP;

import java.net.InetAddress;
import java.net.UnknownHostException;

import TOOLS.SQLtool;
import TOOLS.errCodeManagement;

public class test001_newDB {

	public static void main(String[] args) {
		SQLtool sql=new SQLtool();
		String IPaddr="192.168.1.1";
		try {
			InetAddress addr = InetAddress.getLocalHost();
			IPaddr=addr.getHostAddress();
		} catch (UnknownHostException e1) {
			;
		}
		sql.config(IPaddr, "AKS2019", "sa", "123456");
//		sql.config("10.130.0.231", "Smes", "sa", "led-00");
//		sql.config("10.130.1.15", "Smes", "root", "led-123@");
//		sql.config("192.168.0.39", "AKS2019", "sa", "abcd1234!");
		try {
			sql.connect();
			
			c_wip c=new c_wip(sql);
			c.newDBsheet();
			c.newDBview();
		} catch (Exception e) {
			String str=errCodeManagement.getErrText(e.getMessage());
			System.out.println(str);
		}
	}

}
